<?php
    // uu dai thanh toan quoc te
    $dictionary["Account"]["fields"]["uudaithanhtoanquocte"] = array (
        'name'    => 'uudaithanhtoanquocte',
        'type'    => 'bool',
        'dbType'  => 'tinyint',
        'len'     => 2,
        'vname'   => 'LBL_UUDAITHANHTOANQUOCTE',
    );
    
    $dictionary["Account"]["fields"]["uudaithanhtoannoidia"] = array (
        'name'    => 'uudaithanhtoannoidia',
        'type'    => 'bool',
        'dbType'  => 'tinyint',
        'len'     => 2,
        'vname'   => 'LBL_UUDAITHANHTOANNOIDIA',
    );
    $dictionary["Account"]["fields"]["uudaichuyentien"] = array (
        'name'    => 'uudaichuyentien',
        'type'    => 'bool',
        'dbType'  => 'tinyint',
        'len'     => 2,
        'vname'   => 'LBL_UUDAICHUYENTIEN',
    );
    
    $dictionary["Account"]["fields"]["uudaivaytien"] = array (
        'name'    => 'uudaivaytien',
        'type'    => 'bool',
        'dbType'  => 'tinyint',
        'len'     => 2,
        'vname'   => 'LBL_UUDAIVAYIEN',
    );
   
   $dictionary["Account"]["fields"]["chedouudaiquocte"] = array (
        'name'    => 'chedouudaiquocte',
        'type'    => 'enum',
        'dbType'  => 'int',
        'len'     => 11,
        'options' => 'chedouudai_dom',
        'vname'   => 'LBL_CHEDOUUDAIQUOCTE',
    ); 
    
    $dictionary["Account"]["fields"]["chedouudainoidia"] = array (
        'name'    => 'chedouudainoidia',
        'type'    => 'enum',
        'dbType'  => 'int',
        'options' => 'chedouudai_dom', 
        'len'     => 11,
        'vname'   => 'LBL_CHEDOUUDAINOIDIA',
    );
    
    $dictionary["Account"]["fields"]["chedouudaichuyentien"] = array (
        'name'    => 'chedouudaichuyentien',
        'type'    => 'enum',
        'dbType'  => 'int',
        'len'     => 11,
        'options' => 'chedouudai_dom', 
        'vname'   => 'LBL_CHEDOUUDAICHUYENTIEN',
    );
    
    $dictionary["Account"]["fields"]["chedouudaivaytien"] = array (
        'name'    => 'chedouudaivaytien',
        'type'    => 'enum',
        'dbType'  => 'int',
        'len'     => 11,
        'options' => 'chedouudai_dom', 
        'vname'   => 'LBL_CHEDOUUDAIVAYTIEN',
    );
   
   $dictionary["Account"]["fields"]["loaikhachhang"] = array (
        'name'    => 'loaikhachhang',
        'type'    => 'enum',
        'dbType'  => 'varchar',
        'len'     => 50,
        'options' => 'account_type_dome',
        'vname'   => 'LBL_ACCOUNT_TYPE',
    );
   
    $dictionary["Account"]["fields"]["doanhso"] = array ( 
        'name'    => 'doanhso',
        'type'    => 'currency',
        'dbType'  => 'decimal',
        'len'     => 18,
        'precision' => 2,
        'vname'   => 'LBL_DOANHSO',
        'enable_range_search' => true,
    ); 
    
    $dictionary["Account"]["fields"]["visa_car"] = array ( 
        'name'    => 'visa_car',
        'type'    => 'bool',
        'dbType'  => 'varchar',
        'len'     => 50,
        'vname'   => 'LBL_VISA_CARD',
    );
    
    $dictionary["Account"]["fields"]["master_car"] = array ( 
        'name'    => 'master_car',
        'type'    => 'bool',
        'dbType'  => 'varchar',
        'len'     => 50,
        'vname'   => 'LBL_MASTER_CARD',
    );
    
    $dictionary["Account"]["fields"]["acc_address"] = array ( 
        'name'    => 'acc_address',
        'type'    => 'text',
        'vname'   => 'LBL_ACCOUNT_ADDRESS',
    );
    
    $dictionary["Account"]["fields"]["sothephathanh"] = array ( 
        'name'      => 'sothephathanh',
        'type'      => 'int',
        'len'       => 5,
        'vname'     => 'LBL_SOTHEPHATHANH',
    );
    
    $dictionary["Account"]["fields"]["autocode"] = array ( 
        'name'      => 'autocode',
        'type'      => 'int',
        'vname'     => 'LBL_AUTOCODE',
    ); 
    
    $dictionary["Account"]["fields"]["code"] = array ( 
        'name'      => 'code',
        'type'      => 'varchar',
        'len'       => '15',
        'vname'     => 'LBL_CODE',
    );
    
    // so phong ban
   $dictionary["Account"]["fields"]["sophongban"] = array (  
        'name'      => 'sophongban',
        'vname'     => 'LBL_SOPHONGBAN',
        'type'      => 'int',
        'len'       => 3,
   ); 
   
   // diem tich luy
  $dictionary["Account"]["fields"]["diemtichluy"] = array (  
    'name'      => 'diemtichluy',
    'vname'     => 'LBL_DIEMTICHLUY',
    'type'      => 'int',
    'len'       => 11,
  ); 
  // ngày mở tài khoản 
  $dictionary["Account"]["fields"]["ngaymotaikhoan"] = array (  
      'name'     => 'ngaymotaikhoan',
      'vname'    => 'LBL_NGAYMOTAIKHOAN',
      'type'     => 'date',
  );  
  
  // von dieu le,
   $dictionary["Account"]["fields"]["vondieule"] = array (  
      'name'        => 'vondieule',
      'vname'       => 'LBL_VONDIEULE',
      'type'        => 'currency',
      'dbType'      => 'decimal',
      'len'         => 18,
      'precision'   => '2',
  ); 
  
  // hinh thuc giao dich,
  $dictionary["Account"]["fields"]["hinhthucgiaodich"] = array (
    'name'      => 'hinhthucgiaodich',
    'vname'     => 'LBL_HINHTHUCGIAODICH',
    'type'      => 'multienum',
    'dbType'    => 'varchar',
    'len'       => 50,
    'options'   => 'hinhthucgiaodich_dom',
  );
  
  // so CIF
  $dictionary["Account"]["fields"]["socif"] = array (
    'name'      => 'socif',
    'vname'     => 'LBL_SOCIF',
    'type'      => 'varchar',
    'len'       => 100,
  );
  
  $dictionary["Account"]["fields"]['currency_id'] = array (
    'required' => false,
    'name' => 'currency_id',
    'vname' => 'LBL_CURRENCY',
    'type' => 'id',
    'massupdate' => 0,
    'comments' => '',
    'help' => '',
    'importable' => 'true',
    'duplicate_merge' => 'disabled',
    'duplicate_merge_dom_value' => 0,
    'audited' => false,
    'reportable' => true,
    'len' => 36,
    'size' => '20',
    'studio' => 'visible',
    'function' => 
    array (
      'name' => 'getCurrencyDropDown',
      'returns' => 'html',
    ),
  );
  // ngay thanh lap;
  $dictionary["Account"]["fields"]['doe_day'] = array ( 
    'name'      => 'doe_day',
    'vname'     => 'LBL_DOE_DAY',
    'type'      => 'enum',
    'dbType'    => 'int',
    'len'       => 2,
    'options'   => 'doe_day_dom'
  
  );
  // thang thanh lap   
  $dictionary["Account"]["fields"]['doe_month'] = array (     
    'name'      => 'doe_month',
    'vname'     => 'LBL_DOE_MONTH',
    'type'      => 'enum',
    'dbType'    => 'int',
    'len'       => 2,
    'options'   => 'doe_month_dom',
  );
  
// nam thanh lap,
 $dictionary["Account"]["fields"]['doe_year'] = array (   
   'name'       => 'doe_year',
   'vname'      => 'LBL_DOE_YEAR',
   'type'       => 'int',
   'len'        => 4,
 );
 
 // dac diem giao dich dung de trich loc
    $dictionary["Account"]["fields"]['dacdiemgiaodich'] = array (
      'name'    => 'dacdiemgiaodich',
      'type'    => 'enum',
      'vname'   => 'LBL_DACDIEMGIAODICH',
      'dbType'  => 'varchar', 
      'len'     => 100,
      'options' => 'loaihinhthanhtoan_dom',
    );
    
    // dia chi 2
    $dictionary["Account"]["fields"]['address2'] = array ( 
        'name'  => 'address2',
        'vname' => 'LBL_ADDRESS_2',
        'type'  => 'text',
    );
    
    // the tin dung
    $dictionary["Account"]["fields"]['credit_card'] = array (
        'name'      => 'credit_card',
        'vname'     => 'LBL_CREDIT_CARD',
        'type'      => 'bool',
    );
    
    $dictionary["Account"]["fields"]['transactioninfo'] = array (
            'name' => 'transactioninfo',
            'type' => 'link',
            'relationship' => 'account_transactionifo',
            'module'=>'TransactionInfo',
            'bean_name'=>'TransactionInfo',
            'source'=>'non-db',
            'vname'=>'LBL_TRANSACTIONINFO',
    );
    
   $dictionary["Account"]["fields"]['transactions'] = array (
            'name' => 'transactions',
            'type' => 'link',
            'relationship' => 'account_transactions',
            'module'=>'Transactions',
            'bean_name'=>'Transactions',
            'source'=>'non-db',
            'vname'=>'LBL_TRANSACTION',
    ); 
    
    // qualitative info 
    $dictionary["Account"]["fields"]['qualitative_info'] = array (
        'name'      => 'qualitative_info',
        'vname'     => 'LBL_QUALITATIVE_INFO',
        'type'      => 'text',
    ) ;
     
    $dictionary["Account"]["fields"]['care_solution_des'] = array (
       'name'   => 'care_solution_des',
       'vname'  => 'LBL_CARE_SOLUTION_DES',
       'type'   => 'text',
    );
    
    // cus state
    $dictionary["Account"]["fields"]['cus_state'] = array (
        'name'      => 'cus_state',
        'vname'     => 'LBL_CUS_STATE',
        'type'      => 'enum',
        'dbType'    => 'varchar',
        'len'       => 255,
        'options'   => 'province_dom',
    );
    
    $dictionary["Account"]["fields"]['cus_city'] = array ( 
         'name'     => 'cus_city',
         'vname'    => 'LBL_CUS_CITY',
         'type'     => 'varchar',
         'len'      => 255,
    );
    
    
    // relation ship
    // account with transaction info
    $dictionary["Account"]["relationships"]['account_transactionifo'] = array (
        'lhs_module'=> 'Accounts', 'lhs_table'=> 'accounts', 'lhs_key' => 'id',
        'rhs_module'=> 'TransactionInfo', 'rhs_table'=> 'transactioninfo', 'rhs_key' => 'parent_id',
        'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
        'relationship_role_column_value'=>'Accounts'
    ); 
    
     // account with transaction
    $dictionary["Account"]["relationships"]['account_transactions'] = array (
        'lhs_module'=> 'Accounts', 'lhs_table'=> 'accounts', 'lhs_key' => 'id',
        'rhs_module'=> 'Transactions', 'rhs_table'=> 'transactions', 'rhs_key' => 'parent_id',
        'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
        'relationship_role_column_value'=>'Accounts'
    );  
    
?>
